comparison between java and javascript